<div id="maincontent">
	<div id="maincontent_inner">
		<div id="sidebar">
			<div class="menu single">
				<ul>
					<li><a href="#">车辆基础信息库管理</a>
						<ul>
							<li><a href="<?php echo site_url("c=car_info&m=index"); ?>">车辆信息管理</a></li>
							<li><a href="<?php echo site_url("c=car_brand&m=index"); ?>">车辆品牌管理</a></li>
							<li><a href="<?php echo site_url("c=car_series&m=index"); ?>">车辆系列管理</a></li>
							<li  class="current"><a href="<?php echo site_url("c=car_type&m=index"); ?>">车辆类型管理</a></li>
							<li><a href="<?php echo site_url("c=car_structure&m=index"); ?>">车辆结构管理</a></li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<div id="content">
			<?php if($typeid) {?>
			<div class="title">编辑车辆类型</div>
			<?php }else {?>
			<div class="title">新增车辆类型</div>
			<?php }?>
			<div class="infoarea">
				<form  id="editForm" name="editForm"  action="<?php echo site_url("c=car_type&m=$method&typeid=$typeid"); ?>" method="post" >
				<input type="hidden" name="typeeditsubmit" value="true" />
				<table border="0" cellspacing="0" cellpadding="0" width="100%" class="aev">
					<tr>
						<th>类型名称:</th>
						<td><input type="text" class="half" id="typename" name="typename" value="<?php echo $typename; ?>"/><?php echo form_error('typename'); ?></td>
					</tr>
				</table>
				<div class="box nav" style="margin-top:5px;margin-bottom:0;">
					&nbsp;<div style="float:right"><input type="submit" class="btn" value="确定"/>&nbsp;<input type="button" class="btn" value="返回" onclick="gotoPage('<?php echo site_url("c=car_type&m=index"); ?>');"/></div>
				</div>
				</form>
			</div>
		</div>
	</div>
</div>


<script type="text/javascript">
	
	$(document).ready(function(){
		 
				
		$("#editForm").validate({
			
			rules:{
				typename : {
					required:true,
					rangelength:[1,20]
				} 
			},
			messages:{
				typename : {
					required:"类型名称不能为空",
					rangelength: $.format("类型名称必须在{0}-{1}个字符之间")
				} 
			} 
		});
	});

</script>